<?php
$user=$_GET['id'];

$users=get_user_by_username($user);
	if($users){
	$data['user']=$users;
	$cache=new cache;
	$og_url=HOME."video/user/".$users['username']."/";
	//-------------------------- GET TRUYEN ----------------
    $sql ="SELECT * from blog_video where status=1 and upload_user='".$users['username']."' order by id desc ";
	$sql2="SELECT id from blog_video where status=1 and upload_user='".$users['username']."'";

	$pager = new Pagination($sql, 20, 5,$og_url,500);
	$pager->setDebug(false);
	$cache=new cache;
	$data[info] = $pager->paginate($cache,$sql2);
	$data[nav]	= $pager->renderFullNav();
	}else{
			header('HTTP/1.0 404 Not Found');
			redirect(HOME.'404.html');
			die();
		}
	

			$data1[title]=web_title("Video của $user");
			$data1['mota']=web_des("Những video đăng bới $user");
			$data1['keyword']=web_keyword("video clip,clip video,video cua $user,$user");

loadview('template/header_video',$data1);
loadview("video/user",$data);
loadview('template/footer_video');
exit();